package b.sync.sample

import cats.effect.{ExitCode, IO, IOApp}

object TPckSyncApp extends IOApp {

  override def run(args: List[String]): IO[ExitCode] = {
    for {
      rows <- TPckExtractor.extract(0)
      _ <- IO(println(s"extracted ${rows.length} rows:"))
      _ <- IO(rows.foreach(println))
      count <- TPckReplicator.replicate(rows)
      _ <- IO(println(s"replicated: $count"))
    } yield ExitCode.Success
  }
}
